#include "mainwindow.h"
#include "./ui_mainwindow.h"
#include <QLabel>
#include <QDebug>
#include <QGridLayout>
#include <QPushButton>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QWidget* w= new QWidget(this);
    w->setFixedSize(800,800);
    this->setCentralWidget(w);
    QGridLayout* layout = new QGridLayout(w);
    QPushButton* w1 = new QPushButton;
    QPushButton* w2 = new QPushButton;
    QPushButton* w3 = new QPushButton;
    w2->setFixedSize(1000,500);
    auto handleBtn=[](QPushButton* b)
    {
        b->setFixedSize(40,40);
    };
    handleBtn(w1);
    handleBtn(w2);
    handleBtn(w3);
    layout->addWidget(w1,0,0,2,2,Qt::AlignRight);
    layout->addWidget(w2,0,2,1,1,Qt::AlignLeft);
    layout->addWidget(w3,1,2,1,1,Qt::AlignLeft);


}

MainWindow::~MainWindow()
{
    delete ui;
}
